﻿<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master"
    Codebehind="MenuEdit.aspx.cs" Inherits="ud_MenuHTML.MenuEdit" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
<portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
    <mp:CornerRounderTop id="ctop1" runat="server" />
    <asp:Panel ID="pnlStoreManager" runat="server" CssClass="art-Post-inner panelwrapper admin">
        <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
        <div class="modulecontent">
        <fieldset>
            <legend>
                <asp:Literal ID="ltrTitle" runat="server"></asp:Literal>
            </legend>
        
            <asp:UpdatePanel ID="upGrid" runat="server" UpdateMode="Conditional" >
                <ContentTemplate>
                    <mp:mojoGridView ID="gvItems" runat="server" AutoGenerateColumns="false"
                        AllowPaging="true" CssClass="gridviewadmin">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Literal ID="ltrName" runat="server" Text='<%# Eval("Name") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Literal ID="ltrSort" runat="server" Text='<%# Eval("SortOrder") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl='<%# EditLinkImageUrl %>' CommandName="EditItem"
                                        CommandArgument='<%# Eval("Guid") %>' ToolTip="<%# EditLinkText %>" CausesValidation="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibtnDelete" runat="server" ImageUrl='<%# DeleteLinkImageUrl %>'
                                        CommandName="DeleteItem" CommandArgument='<%# Eval("Guid") %>' ToolTip="<%# DeleteLinkText %>"
                                        CausesValidation="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:Literal ID="ltrEmpty" runat="server" Text='<%# Resources.MenuHTMLResource.EmptyGridView %>' />
                        </EmptyDataTemplate>
                    </mp:mojoGridView>
                 </ContentTemplate>
            </asp:UpdatePanel>
                    <asp:Panel ID="pnlEdit" runat="server">
                        <div class="settingrow">
                            <mp:SiteLabel ID="lblName" runat="server" ResourceFile="MenuHTMLResource" ConfigKey="MenuName"
                                CssClass="settinglabel" ForControl="txtName" />
                        </div>
                        <div class="settingrow">
                            <asp:TextBox ID="txtName" runat="server" MaxLength="255" CssClass="settingtextbox widetextbox"/>
                            <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName" 
                            ErrorMessage="*" ValidationGroup="MenuHTML" />
                        </div>
                        <div class="settingrow">
                            <mp:SiteLabel ID="lblLink" runat="server" ResourceFile="MenuHTMLResource" ConfigKey="MenuLink"
                                CssClass="settinglabel" ForControl="txtLink" />
                        </div>
                        <div class="settingrow">
                            <asp:TextBox ID="txtLink" runat="server" CssClass="settingtextbox widetextbox"/>
                            <asp:RequiredFieldValidator ID="rfvLink" runat="server" ControlToValidate="txtLink" 
                            ErrorMessage="*" ValidationGroup="MenuHTML" />
                        </div>
                        <div class="settingrow">
                            <mp:SiteLabel ID="lblOrder" runat="server" ResourceFile="MenuHTMLResource" ConfigKey="MenuOrder"
                                CssClass="settinglabel" ForControl="txtOrder" />
                        </div>
                        <div class="settingrow">
                            <asp:TextBox ID="txtOrder" runat="server" CssClass="settingtextbox widetextbox" MaxLength="3"/>
                            <asp:RequiredFieldValidator ID="rfvOrder" runat="server" ControlToValidate="txtOrder" 
                            ErrorMessage="*" ValidationGroup="MenuHTML" />
                            <asp:RegularExpressionValidator ID="rev" runat="server" ControlToValidate="txtOrder" 
                            ErrorMessage="*" ValidationGroup="MenuHTML" ValidationExpression="^\d(\d)?(\d)?$" />
                        </div>
                        <div class="settingrow">
                            <mp:SiteLabel ID="lblImage" runat="server" ForControl="txtImageUrl" CssClass="settinglabel"
                                ConfigKey="ItemImageUrlLabel" ResourceFile="MenuHTMLResource"></mp:SiteLabel>
                        </div>
                        <div class="settingrow">
                            <asp:FileUpload ID="fuImageUrl" runat="server" CssClass="forminput" />
                            <asp:Label ID="lblImageUrlError" runat="server" />
                        </div>
                        <div class="settingrow">
                            <asp:UpdatePanel ID="updImgDel" runat="server">
                                <ContentTemplate>
                                    <div runat="server" id="divImage" visible="false">
                                        <asp:Image runat="server" ID="imgView" Width="100px" Style="max-height: 60px" />
                                        <asp:ImageButton ID="btnDeleteImg" runat="server" />
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                        <div class="settingrow">
                            <mp:SiteLabel ID="lblTarget" runat="server" ResourceFile="MenuHTMLResource" ConfigKey="MenuTarget"
                                CssClass="settinglabel" ForControl="ddlTarget" />
                        </div>
                        <div class="settingrow">
                            <asp:DropDownList runat="server" ID="ddlTarget">
                            </asp:DropDownList>
                        </div>

                        <div class="settingrow">
                            <portal:mojoButton ID="btnSave" runat="server" ValidationGroup="MenuHTML"/>
                            <portal:mojoButton ID="btnBack" runat="server" CausesValidation="false" />
                            <portal:mojoButton ID="btnDelete" runat="server" CausesValidation="false" />
                        </div>
                    </asp:Panel>
               
            </fieldset>
        </div>
        </portal:mojoPanel>
        <div class="cleared"></div>
    </asp:Panel>
    <mp:CornerRounderBottom id="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
